import request from '../utils/request'

const baseUrl = 'group'

export function addGroup(name) {
    return request({
        url: baseUrl + '/addGroup',
        method: 'post',
        data: {
            name: name
        }
    })
}

export function editGroup(id, name) {
    return request({
        url: baseUrl + '/editGroup',
        method: 'post',
        data: {
            id: id,
            name: name
        }
    })
}

export function removeGroup(id) {
    return request({
        url: baseUrl + '/removeGroup',
        method: 'post',
        data: {
            id: id
        }
    })
}

export function getAllGroup() {
    return request({
        url: baseUrl + '/getAllGroup',
        method: 'get',
        params: {}
    })
}